<?php

namespace app\beautiful\model\finance;

use app\common\model\CommonModel;
use think\facade\Db;


class WithdrawAccountLogModel extends CommonModel{

    protected  $name = 'beautiful_account_balance_log';

    protected  $pk   = 'withdraw_account_log_id';


    public static function onBeforeInsert($model)
    {
        $model->set("add_time", date('Y-m-d H:i:s'));
        $model->set("add_ip", request()->ip());
    }
    public static function add($data)
    {
        $return = Db::name('beautiful_account_balance_log')->save($data);

        return $return;
    }

}